const columns = (FormModal, expand, onRemove, namespace) => {
    return [
        {
          type: 'expand',
          width: 60,
          render: (h, {row}) => {
            return h(expand, {
              props: {
                row
              }
            })
          }
        },
        {
            type: 'index',
            width: 60,
            align: 'center'
        },
        {
            title: '反馈标题',
            key: 'title',
        },
        {
          title: '联系方式',
          key: 'contactWay',
          width:160
        },
        {
          title: '是否回复',
          key: 'replyStatus',
          width:130,
          render: (h, {row}) => {
            if(row.replyStatus === '1') {
              return h('Tag', {
                props: {
                  type: 'dot',
                  color: 'green'
                }
              }, '已回复')
            } else {
              return h('Tag', {
                props: {
                  type: 'dot',
                }
              }, '未回复')
            }
          }
        },
        {
          title: '回复人',
          key: 'replyUserId',
          width:100
        },
        {
            title: '创建日期',
            key: 'ctime',
            width: 180
        },
        {
            title: '维护日期',
            key: 'mtime',
            width: 180
        }, {
            title: '操作',
            key: 'operation',
            width: 140,
            render: (h, { row, column, index }) => {
                return h('div', [
                    h(FormModal, {
                        props: {
                            title: '编辑权限',
                            record: row,
                            option: 'update',
                            namespace
                        }
                    }, '回复'),
                    h('Button', {
                        on: {
                            click: () => onRemove(row.id)
                        },
                        props: {
                            type: 'text',
                            size: 'small'
                        },
                    }, '删除')
                ]);
            }
        }
    ]
}
export default columns;
